<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      Sysstat-12.3.1
    </title>
    <link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.79.1" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
  </head>
  <body class="blfs" id="blfs-9.1">
    <div class="navheader">
      <h4>
        Beyond Linux<sup>�</sup> From Scratch <span class="phrase">(System
        V</span> Edition) - Version 9.1
      </h4>
      <h3>
        Chapter&nbsp;12.&nbsp;System Utilities
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="sg3_utils.html" title=
          "sg3_utils-1.44">Prev</a>
          <p>
            sg3_utils-1.44
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="udisks2.html" title="UDisks-2.8.4">Next</a>
          <p>
            UDisks-2.8.4
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="sysutils.html" title=
          "Chapter&nbsp;12.&nbsp;System Utilities">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 9.1">Home</a>
        </li>
      </ul>
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="sysstat" name="sysstat"></a>Sysstat-12.3.1
      </h1>
      <div class="package" lang="en" xml:lang="en">
        <h2 class="sect2">
          Introduction to Sysstat
        </h2>
        <p>
          The <span class="application">Sysstat</span> package contains
          utilities to monitor system performance and usage activity.
          <span class="application">Sysstat</span> contains the <span class=
          "command"><strong>sar</strong></span> utility, common to many
          commercial Unixes, and tools you can schedule via cron to collect
          and historize performance and activity data.
        </p>
        <p>
          This package is known to build and work properly using an LFS-9.1
          platform.
        </p>
        <h3>
          Package Information
        </h3>
        <div class="itemizedlist">
          <ul class="compact">
            <li class="listitem">
              <p>
                Download (HTTP): <a class="ulink" href=
                "http://sebastien.godard.pagesperso-orange.fr/sysstat-12.3.1.tar.xz">
                http://sebastien.godard.pagesperso-orange.fr/sysstat-12.3.1.tar.xz</a>
              </p>
            </li>
            <li class="listitem">
              <p>
                Download MD5 sum: 66cb8d297bd6c14f14650dcd5fd4ac10
              </p>
            </li>
            <li class="listitem">
              <p>
                Download size: 696 KB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated disk space required: 20 MB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated build time: 0.1 SBU
              </p>
            </li>
          </ul>
        </div>
        <h3>
          Sysstat Dependencies
        </h3>
        <p>
          There are no build-time requirements for this package; however, it
          is designed to be controlled by a cron daemon such as <a class=
          "xref" href="fcron.html" title="Fcron-3.2.1">Fcron-3.2.1</a>.
        </p>
        <p class="usernotes">
          User Notes: <a class="ulink" href=
          "http://wiki.linuxfromscratch.org/blfs/wiki/sysstat">http://wiki.linuxfromscratch.org/blfs/wiki/sysstat</a>
        </p>
      </div>
      <div class="installation" lang="en" xml:lang="en">
        <h2 class="sect2">
          Installation of Sysstat
        </h2>
        <p>
          Install <span class="application">Sysstat</span> by running the
          following commands:
        </p>
        <pre class="userinput">
<kbd class="command">sa_lib_dir=/usr/lib/sa    \
sa_dir=/var/log/sa        \
conf_dir=/etc/sysconfig   \
./configure --prefix=/usr \
            --disable-file-attr &amp;&amp;
make</kbd>
</pre>
        <p>
          This package does not come with a test suite.
        </p>
        <p>
          Now, as the <code class="systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class="command">make install</kbd>
</pre>
      </div>
      <div class="commands" lang="en" xml:lang="en">
        <h2 class="sect2">
          Command Explanations
        </h2>
        <p>
          <code class="envar">sa_lib_dir</code>: This environment variable
          specifies the location of the package-specific library directory.
        </p>
        <p>
          <code class="envar">sa_dir</code>: This environment variable
          specifies the location of the directory containing the data files.
        </p>
        <p>
          <code class="envar">conf_dir</code>: This environment variable
          specifies the location of the system configuration directory.
        </p>
        <p>
          <em class="parameter"><code>--disable-file-attr</code></em>: Do not
          set attributes on files being installed. This parameter causes the
          installation to ignore the man group variable resulting in the man
          files having <code class="systemitem">root</code>: <code class=
          "systemitem">root</code> ownership.
        </p>
        <div class="admon note">
          <img alt="[Note]" src="../images/note.png" />
          <h3>
            Note
          </h3>
          <p>
            Run <span class="command"><strong>./configure
            --help</strong></span> to see other influential environment
            variables you can pass to <span class=
            "command"><strong>configure</strong></span>. You may want to use
            the <code class="envar">history</code> and <code class=
            "envar">compressafter</code> variables to customize the amount of
            data files kept on the system.
          </p>
        </div>
      </div>
      <div class="configuration" lang="en" xml:lang="en">
        <h2 class="sect2">
          Configuring Sysstat
        </h2>
        <div class="sect3" lang="en" xml:lang="en">
          <h3 class="sect3">
            <a id="sysstat-config" name="sysstat-config"></a>
          </h3>
          <h4 class="title">
            <a id="sysstat-config" name="sysstat-config"></a>Config Files
          </h4>
          <p>
            <code class="filename">/etc/sysconfig/sysstat</code> and
            <code class="filename">/etc/sysconfig/sysstat.ioconf</code>
          </p>
        </div>
        <div class="sect3" lang="en" xml:lang="en">
          <h3 class="sect3"></h3>
          <h4 class="title">
            <a id="idm45779269488704" name="idm45779269488704"></a>Cron
            Information
          </h4>
          <p>
            To begin gathering <span class="application">Sysstat</span>
            history information, you must add to, or create a privileged
            user's crontab. The history data location is <code class=
            "filename">/var/log/sa</code>. The user running <span class=
            "application">Sysstat</span> utilities via cron must have write
            access to this location.
          </p>
          <p>
            Below is an example of what to install in the crontab. Adjust the
            parameters to suit your needs. Use <span class=
            "command"><strong>man sa1</strong></span> and <span class=
            "command"><strong>man sa2</strong></span> for information about
            the commands.
          </p>
          <pre class="screen">
<code class=
"literal"># 8am-7pm activity reports every 10 minutes during weekdays
0 8-18 * * 1-5 /usr/lib/sa/sa1 600 6 &amp;

# 7pm-8am activity reports every hour during weekdays
0 19-7 * * 1-5 /usr/lib/sa/sa1 &amp;

# Activity reports every hour on Saturday and Sunday
0 * * * 0,6 /usr/lib/sa/sa1 &amp;

# Daily summary prepared at 19:05
5 19 * * * /usr/lib/sa/sa2 -A &amp;</code>
</pre>
          <p>
            Ensure you submit the revised crontab to the cron daemon.
          </p>
        </div>
        <div class="sect3" lang="en" xml:lang="en">
          <h3 class="sect3">
            <a id="sysstat-init" name="sysstat-init"></a>
          </h3>
          <h4 class="title">
            <a id="sysstat-init" name="sysstat-init"></a>System Startup
            Information
          </h4>
          <p>
            At system startup, a LINUX RESTART message must be inserted in
            the daily data file to reinitialize the kernel counters. This can
            be automated by installing the <code class=
            "filename">/etc/rc.d/init.d/sysstat</code> init script included
            in the <a class="xref" href="../introduction/bootscripts.html"
            title="BLFS Boot Scripts">blfs-bootscripts-20191204</a> package
            using the following command as the <code class=
            "systemitem">root</code> user:
          </p>
          <pre class="root">
<kbd class="command">make install-sysstat</kbd>
</pre>
        </div>
      </div>
      <div class="content" lang="en" xml:lang="en">
        <h2 class="sect2">
          Contents
        </h2>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">Installed Programs:</strong>
              <span class="segbody">cifsiostat, iostat, mpstat, pidstat,
              sadf, sar, and tapestat</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Libraries:</strong>
              <span class="segbody">None</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Directories:</strong>
              <span class="segbody">/usr/lib/sa,
              /usr/share/doc/sysstat-12.3.1 and /var/log/sa</span>
            </div>
          </div>
        </div>
        <div class="variablelist">
          <h3>
            Short Descriptions
          </h3>
          <table border="0" class="variablelist">
            <colgroup>
              <col align="left" valign="top" />
              <col />
            </colgroup>
            <tbody>
              <tr>
                <td>
                  <p>
                    <a id="cifsiostat" name="cifsiostat"></a><span class=
                    "term"><span class=
                    "command"><strong>cifsiostat</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    displays statistics about read and write operations on
                    CIFS filesystems.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="iostat" name="iostat"></a><span class=
                    "term"><span class=
                    "command"><strong>iostat</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    reports CPU statistics and input/output statistics for
                    devices and partitions.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="mpstat" name="mpstat"></a><span class=
                    "term"><span class=
                    "command"><strong>mpstat</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    writes activities for each available processor.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="pidstat" name="pidstat"></a><span class=
                    "term"><span class=
                    "command"><strong>pidstat</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is used for monitoring individual tasks currently being
                    managed by the Linux kernel.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="sadf" name="sadf"></a><span class=
                    "term"><span class=
                    "command"><strong>sadf</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is used for displaying the contents of data files created
                    by the <span class="command"><strong>sar</strong></span>
                    command. But unlike <span class=
                    "command"><strong>sar</strong></span>, <span class=
                    "command"><strong>sadf</strong></span> can write its data
                    in many different formats.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="sar" name="sar"></a><span class=
                    "term"><span class="command"><strong>sar</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is used for displaying the contents of elected cumulative
                    activity counters in the operating system.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="tapestat" name="tapestat"></a><span class=
                    "term"><span class=
                    "command"><strong>tapestat</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is used for monitoring the activity of tape drives
                    connected to a system.
                  </p>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
      <p class="updated">
        Last updated on 2020-02-19 08:47:37 -0800
      </p>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="sg3_utils.html" title=
          "sg3_utils-1.44">Prev</a>
          <p>
            sg3_utils-1.44
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="udisks2.html" title="UDisks-2.8.4">Next</a>
          <p>
            UDisks-2.8.4
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="sysutils.html" title=
          "Chapter&nbsp;12.&nbsp;System Utilities">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 9.1">Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
